package com.vdong.common.oauth.common.enums;

public enum PowerTypeEnum {
    //开放平台帐号管理权限(公众号)
    Public(24, "开放平台帐号管理权限(公众号) "),
    //开放平台帐号管理权限(小程序)
    Program(25, "开放平台帐号管理权限(小程序)");
    private int code;
    private String desc;

    PowerTypeEnum(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public int getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }

    public static PowerTypeEnum getEnum(int value) {
        for (PowerTypeEnum authorizeTypeEnum : PowerTypeEnum.values()) {
            if (authorizeTypeEnum.getCode() == value) {
                return authorizeTypeEnum;
            }
        }
        return Program;
    }
}
